﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using System.IO;


namespace CreateEntity
{
    public partial class EntityCode : WeifenLuo.WinFormsUI.Docking.DockContent
    {
        MainResource main;
        public EntityCode(MainResource main)
        {
            this.main = main;
            InitializeComponent();
        }

        /// <summary>
        /// 代码窗口中的RichTextBox
        /// </summary>
        public RichTextBox RichTextBox
        {
            get
            {
                return richTextBox;
            }           
        }      

        //复制
        private void copyCToolStripMenuItem_Click(object sender, EventArgs e)
        {
            main.Copy();
        }

        //保存
        private void cMenuItemSave_Click(object sender, EventArgs e)
        {
            main.SaveFile();
        }

        //剪切
        private void tMenuItemCut_Click(object sender, EventArgs e)
        {
            main.Cut();
        }

        //粘贴
        private void tMenuItemPaste_Click(object sender, EventArgs e)
        {
            main.Paste();
        }

        //全选
        private void tMenuItemSelectAll_Click(object sender, EventArgs e)
        {
            main.SelectAll();
        }
    }
}
